// @APIVersion 1.0.0
// @Title beego Test API
// @Description beego has a very cool tools to autogenerate documents for your API
// @Contact astaxie@gmail.com
// @TermsOfServiceUrl http://beego.me/
// @License Apache 2.0
// @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
package routers

import (
	"github.com/astaxie/beego"

	"lottery/controllers"
)

func init() {
	ns := beego.NewNamespace("/v1",
		beego.NSNamespace("/user",
			beego.NSRouter("/register", &controllers.UserCtl{}, "post:Create"),
			beego.NSRouter("/login", &controllers.UserCtl{}, "post:Login"),
			beego.NSRouter("/logout", &controllers.UserCtl{}, "get:Logout"),
			beego.NSRouter("/checklogin", &controllers.UserCtl{}, "get:CheckLogin"),
		),
		beego.NSNamespace("/agent/",
			beego.NSRouter("/add", &controllers.AgentCtl{}, "post:AddCount"),
			beego.NSRouter("/del", &controllers.AgentCtl{}, "post:DelCount"),
			beego.NSRouter("/update", &controllers.AgentCtl{}, "post:Update"),
			//beego.NSRouter("/use", &controllers.AgentCtl{}, "post:UseCount"),
			beego.NSRouter("/getaccountstlist", &controllers.AgentCtl{}, "get:GetAccoutList"),
			beego.NSRouter("/all", &controllers.AgentCtl{}, "get:UpdataAllCount"),
		),
		beego.NSNamespace("/lottery",
			beego.NSRouter("/login", &controllers.LotteryCtl{}, "post:Login"),
		),
		beego.NSNamespace("/site",
			beego.NSRouter("/getsites", &controllers.SiteCtl{}, "get:GetSiteList"),
			beego.NSRouter("/updatesite", &controllers.SiteCtl{}, "post:UpdateSite"),
			beego.NSRouter("/instersite", &controllers.SiteCtl{}, "post:InsterSite"),
		),
		beego.NSNamespace("/policy",
			beego.NSRouter("/del", &controllers.PolicyCtl{}, "get:DelPolicy"),
			beego.NSRouter("/getuser", &controllers.PolicyCtl{}, "get:GetUserPolicy"),
			beego.NSRouter("/update", &controllers.PolicyCtl{}, "post:UpdatePolicy"),
			beego.NSRouter("/bindmatch", &controllers.PolicyCtl{}, "post:BindMatch"),
			beego.NSRouter("/attenlist", &controllers.PolicyCtl{}, "get:GetAttenList"),
			beego.NSRouter("/allgamedata", &controllers.PolicyCtl{}, "get:GetAllGameData"),
		),
		beego.NSNamespace("/game",
			beego.NSRouter("/getlist", &controllers.GameCtl{}, "get:GetGames"),
		),
		beego.NSNamespace("/order",
			beego.NSRouter("/getlist", &controllers.OrderCtl{}, "get:GetOrderList"),
			beego.NSRouter("/getresult", &controllers.OrderCtl{}, "get:GetOrderResult"),
		),
		beego.NSNamespace("/tearmdict",
			beego.NSRouter("/getlist", &controllers.TearmDictCtl{}, "get:GetTearmList"),
		),
	)
	beego.AddNamespace(ns)
}
